-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardizing First Party Data #4472
Standardizing First Party Data #4472
Conversation
…ebid.js into master-rubicon-clean
# Conflicts: # modules/advangelistsBidAdapter.js # test/spec/modules/advangelistsBidAdapter_spec.js
…ter-remote-updated
…ndard-first-party-data
…ndard-first-party-data
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
…ndard-first-party-data
Ok, let's see if we can drive this home. @msm0504 - does this pbsBidAdapter code handle ext.prebid.bidderconfig as discussed in |
@snapwich - from your last review we updated the openRtb format to support the per-bidder FPD. |
docs PR prebid/prebid.github.io#1764 |
@bretg The Here's the unit test for the scenario:
|
} | ||
|
||
const matchingFpd = find(acc, addedFpd => | ||
JSON.stringify(addedFpd.config.fpd) === JSON.stringify(fpd)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a safe comparison. Browser's honor insertion order for objects which means two objects that essentially contain the same data would not be equal depending on the order the data was inserted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the code for setBidderConfig
, the data is separated out and stored by bidder. Here I want to combine that so if multiple bidders have the same FPD, the data is only added and sent once with an array of all bidders. How would you suggest checking whether FPD configs match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'd have to do a deep comparison if you wanted to be sure that they were actually "equal"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an existing util for deep comparisons? Or would I need to add or write one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msm0504 - there's this imported in utils.js
export { default as deepAccess } from 'dlv/index';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is not currently a utility method for doing deep comparison in Prebid.js. I guess my concern is deeper though: why is this API attempting to de-dupe repetitive data? It seems to make for an awkward data structure and I can't see any reasons for the attempt other than space savings? Isn't that what gzip is for?
matchingFpd.bidders.push(bidder); | ||
} else { | ||
acc.push({ | ||
bidders: [ bidder ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this is an array? It seems like it will always be an array of one bidder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not always. If 2 bidders have the same FPD, the 2nd will be added to the bidders array
…ndard-first-party-data
Type of change
Description of change
Use
fpd.user
andfpd.context
objects fromconfig
to get first party data within Rubicon and Prebid Server bid adaptersData format from Solution Proposal #3687